Datetime optimization (#439)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 20 Jan 2020 17:09:52 +0000 (10:09 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Jan 2020 17:09:52 +0000 (10:09 -0700)
commit3dc4be051c0a9d05d795030873ebdb0537a78bc1
treecb1543af984f0b28dafff92a8254ae9fc8ee86a1
parent5b4eaf21a984b04eb77e5b8948b9ef4e3e97d468
Datetime optimization (#439)

* Optimize performance of DateTime.

Prefer Qt::UTC TimeSpec for storing creation_time.
This avoids very significant performance hits from converting
to/from Qt::LocalTime, which involve DST calculations as well
as the usual offsets.
Test suite with this commit runs at 63% of wall-clock time of the
baseline (time ./testo)!

* remove obsolete fromTime_t and use Qt::UTC.

* Delete obsolete operators and methods of DateTime.

* document motivation for Qt::UTC as default timespec.

Modify Waypoint::SetCreationTime so it can be used with seconds, milliseconds,
or both operands.  This method is implemented without resetting the
Qt::TimeSpec.  It will be efficient if the existing TimeSpec is
Qt::UTC as set up by gpsbabel::DateTime default constructor.
defs.h
garmin_fit.cc
gopal.cc
gtm.cc
lowranceusr.cc
random.cc
src/core/datetime.h
unicsv.cc
util.cc
waypt.cc
xcsv.cc